<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>库存管理</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="__PUBLIC__/css/layui.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/admin.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/public.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/bootstrap.css" rel="stylesheet" type="text/css"/>
    <link rel="stylesheet" href="__PUBLIC__/css/looklayer.css"  media="all">
    <style>
    #popCon .layui-input-block{
        padding-left: 100px;
        width: 240px;
    }
    #popCon .layui-form-label{
        padding-left: 80px;
        text-align: left;
    }
    #popCon .layui-layer-title{
        padding: 0px 20px 0 20px!important;
    }
    #popCon .layui-row{
        padding: 0px;
    }
    .more_show2{
        position: relative;
    }
    .more_show2 button{
        position: absolute;
        right:18%;
        top: 36%;
    }
    .more_show2 button:nth-of-type(1){
        margin-right: 60px;
    }
    .more_show2 button:nth-of-type(2){
        background: #666;
    }
    
    </style>
    
    
</head>
<body>
<div class="layui-conter">
    <div class="layui-col-md12">
        <div class="navigation">
            <span>行政></span><span>仓库管理></span><span>库存管理</span>
        </div>

        <div class="white-conter">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="title-blue"><b>库存管理</b></div>
                    <div class="layui-card-body addPadding">
                        <form class="layui-form" action="" lay-filter="component-form-group">
                            <div class="layui-form-item">
                                <label class="layui-form-label">高级搜索：</label>
                                <div class="layui-input-block">
                                    <div class="layui-col-xs4">
                                        <input style="background: #dce6f0;border: none" type="text" name="title" lay-verify="title" autocomplete="off" placeholder="条形码/商品名称/编号..." class="layui-input">
                                    </div>
                                    <button class="layui-btn layui-btn-sm layui-btn-normal" style="margin: -10px 25px 0px 25px;vertical-align: text-top;">搜索</button>
                                    <div class="more">更多筛选<i class="layui-icon layui-icon-up"></i></div>
                                </div>
                            </div>
                            <div class="more_show" style="display: none;">                                                        
                                <div class=" layui-row" style="margin-top: 20px">
                                    <div class=" layui-col-xs3">
                                        <label class="layui-form-label">条形码：</label>
                                        <div class="layui-input-block">
                                                <input type="text" placeholder="请输入" name='quiz1' class="layui-input" >
                                        </div>
                                    </div>
                                    <div class="layui-col-xs3">
                                        <label class="layui-form-label">商品分类：</label>
                                        <div class="layui-input-block">
                                                <select name="quiz2">
                                                        <option value="" selected="">请选择</option>
                                                        <option value="1" >1</option>
                                                        <option value="2">2</option>
                                                        <option value="3">3</option>
                                                </select>
                                        </div>
                                    </div>
                                    <div class=" layui-col-xs3">
                                        <label class="layui-form-label">商品名称：</label>
                                        <div class="layui-input-block">
                                                <input type="text" placeholder="请输入" class="layui-input" name='quiz3' >
                                        </div>
                                    </div>
                                </div>
                                <div class=" layui-row" style="margin-top: 20px">
                                    <div class=" layui-col-xs3">
                                        <label class="layui-form-label">供应商：</label>
                                        <div class="layui-input-block">
                                            <select name="quiz4">
                                                    <option value="" selected="">请选择</option>
                                                    <option value="1" >1</option>
                                                    <option value="2">2</option>
                                                    <option value="3">3</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class=" layui-col-xs3">
                                        <label class="layui-form-label">所在仓库：</label>
                                        <div class="layui-input-block">
                                            <select name="quiz5">
                                                    <option value="" selected="">请选择</option>
                                                    <option value="1" >1</option>
                                                    <option value="2">2</option>
                                                    <option value="3">3</option>
                                            </select>
                                        </div>
                                    </div>
                                     <div class=" layui-col-xs3">
                                        <label class="layui-form-label">入库日期：</label>
                                        <div class="layui-input-block">
                                            <input type="text" name="enddate" id="enddate" lay-verify="date" placeholder="请选择"  class="layui-input" >
                                        </div>
                                    </div>
                                </div>
                            </div>                          
                        </form>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-btn-group" style="margin:0 0 20px">
                                <button class="layui-btn layui-btn-primary layui-btn-sm btnGroup-img" id="allot" data-type=""><img src="__PUBLIC__/images/add.png">库存调拨
                                </button>
                                <button class="layui-btn layui-btn-primary layui-btn-sm btnGroup-img"><img src="__PUBLIC__/images/del-list.png">删除列表
                                </button>
                            </div>
                            <div class="layui-card-body addPadding">
                                <form class="layui-form" action="" lay-filter="component-form-group">
                                    <div class="more_show2" style="display: none;">                                                        
                                        <div class=" layui-row">
                                            <div class=" layui-col-xs3">
                                                <label class="layui-form-label">经办人：</label>
                                                <div class="layui-input-block">
                                                        <select name="quiz2">
                                                                <option value="" selected="">请选择</option>
                                                                <option value="1" >1</option>
                                                                <option value="2">2</option>
                                                                <option value="3">3</option>
                                                        </select>
                                                </div>
                                            </div>
                                            <div class="layui-col-xs3">
                                                <label class="layui-form-label">调出仓库：</label>
                                                <div class="layui-input-block">
                                                        <select name="quiz2">
                                                                <option value="" selected="">请选择</option>
                                                                <option value="1" >1</option>
                                                                <option value="2">2</option>
                                                                <option value="3">3</option>
                                                        </select>
                                                </div>
                                            </div>
                                            <div class=" layui-col-xs3">
                                                <label class="layui-form-label">调拨日期：</label>
                                                <div class="layui-input-block">
                                                    <input type="text" name="enddate" id="allotdate" lay-verify="date" placeholder="请选择"  class="layui-input" >
                                                </div>
                                            </div>
                                        </div>
                                        <div class=" layui-row" style="margin-top: 20px">
                                            <div class=" layui-col-xs3">
                                                <label class="layui-form-label">数量：</label>
                                                <div class="layui-input-block">
                                                    <select name="quiz2">
                                                            <option value="" selected="">请选择</option>
                                                            <option value="1" >1</option>
                                                            <option value="2">2</option>
                                                            <option value="3">3</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class=" layui-col-xs3">
                                                <label class="layui-form-label">调入仓库：</label>
                                                <div class="layui-input-block">
                                                    <select name="quiz2">
                                                            <option value="" selected="">请选择</option>
                                                            <option value="1" >1</option>
                                                            <option value="2">2</option>
                                                            <option value="3">3</option>
                                                    </select>
                                                </div>
                                            </div>
                                            <div class=" layui-col-xs3">
                                                <label class="layui-form-label">备注信息：</label>
                                                <div class="layui-input-block">
                                                        <input type="text" placeholder="请输入" class="layui-input" >
                                                </div>
                                            </div>
                                        </div>
                                        <button class="layui-btn layui-btn-sm layui-btn-normal" >执行调拨</button>
                                        <button class="layui-btn layui-btn-sm layui-btn-normal" >取消</button>
                                        
                                    </div>
                                </from>
                            </div>
                            <table  class="layui-hide" id="test-table-operate" lay-filter="test-table-operate"></table>
                            <div class="layui-form layui-border-box layui-table-view" lay-filter="LAY-table-1">
                                <div class="layui-table-box" style="margin-bottom: 20px">
                                    <div class="layui-table-body layui-table-main">
                                        <table cellspacing="0" cellpadding="0" border="0" class="layui-table">
                                            <thead>
                                            <tr>
                                                <th data-field="0" data-unresize="true">
                                                    <div class="layui-table-cell laytable-cell-1-0 laytable-cell-checkbox">
                                                        <input type="checkbox" name="layTableCheckbox" lay-skin="primary"
                                                               lay-filter="layTableAllChoose">
                                                        <div class="layui-unselect layui-form-checkbox" lay-skin="primary">
                                                            <i class="layui-icon layui-icon-ok"></i>
                                                        </div>
                                                    </div>
                                                </th>
                                                <th data-field="w-barcode">
                                                    <div class="layui-table-cell laytable-cell-w-barcode">
                                                        <span>条形码</span>
                                                        </span>
                                                    </div>
                                                </th>
                                                <th data-field="w-goodsnum">
                                                    <div class="layui-table-cell laytable-cell-w-goodsnum" align="center">
                                                        <span>商品编号</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-goodsname">
                                                    <div class="layui-table-cell laytable-cell-w-goodsname" align="center">
                                                        <span>商品名称</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-bid">
                                                    <div class="layui-table-cell laytable-cell-w-bid" align="center">
                                                        <span>单位进价</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-price">
                                                    <div class="layui-table-cell laytable-cell-w-price" align="center">
                                                        <span>售价</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-stock">
                                                    <div class="layui-table-cell laytable-cell-w-stock" align="center">
                                                        <span>库存</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-warn">
                                                    <div class="layui-table-cell laytable-cell-w-warn" align="center">
                                                        <span>警戒数</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-unit">
                                                    <div class="layui-table-cell laytable-cell-w-unit" align="center">
                                                        <span>单位</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-classify">
                                                    <div class="layui-table-cell laytable-cell-w-classify" align="center">
                                                        <span>分类</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-state">
                                                    <div class="layui-table-cell laytable-cell-w-state" align="center">
                                                        <span>状态</span>
                                                    </div>
                                                </th>
                                                <th data-field="w-sort">
                                                    <div class="layui-table-cell laytable-cell-w-sort" align="center">
                                                        <span>排序</span>
                                                    </div>
                                                </th>
                                                <th data-field="operation">
                                                    <div class="layui-table-cell laytable-cell-1-operation" align="center">
                                                        <span>操作</span>
                                                    </div>
                                                </th>
                                            </tr>
                                            </thead>
                                            <tbody>
                                                <volist name="userList" id="list">
                                                <tr data-index="0" class="">
                                                    <td data-field="0">
                                                        <div class="layui-table-cell laytable-cell-1-0 laytable-cell-checkbox">
                                                            <input type="checkbox" name="layTableCheckbox" lay-skin="primary">
                                                            <div class="layui-unselect layui-form-checkbox" lay-skin="primary">
                                                                <i class="layui-icon layui-icon-ok"></i>
                                                            </div>
                                                        </div>
                                                    </td>
                                                    <td data-field="w-barcode" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-barcode">{$list.barcode}</div>
                                                    </td>
                                                    <td data-field="w-goodsnum" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-goodsnum">{$list.serial}</div>
                                                    </td>
                                                    <td data-field="w-goodsname" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-goodsname">{$list.goodsname}</div>
                                                    </td>
                                                    <td data-field="w-bid" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-bid">
                                                            ￥{$list.purchaseprice}
                                                        </div>
                                                    </td>
                                                    <td data-field="w-price" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-price">￥{$list.price}</div>
                                                    </td>
                                                    <td data-field="w-stock" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-stock">{$list.inventory}</div>
                                                    </td>
                                                    <td data-field="w-warn" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-warn">{$list.alertfor}
                                                        </div>
                                                    </td>
                                                    <td data-field="w-unit" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-unit">
                                                         {$list.unit}
                                                        </div>
                                                    </td>
                                                    <td data-field="w-classify" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-classify">
                                                         {$list.class}
                                                        </div>
                                                    </td>
                                                    <td data-field="w-state" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-state">
                                                         {$list.status}
                                                        </div>
                                                    </td>
                                                    <td data-field="w-sort" align="center">
                                                        <div class="layui-table-cell laytable-cell-w-sort"><span>↑↓</span></div>
                                                    </td>
                                                    <td data-field="operation" align="center">
                                                        <div class="layui-table-cell laytable-cell-1-operation">
                                                             <a class="btn" href="{:U('Home/Warehouse/editStock',array('id'=>$list['id']))}">编辑</button></a>
                                                             <a class="btn" href="{:U('Home/Warehouse/delStock',array('id'=>$list['id']))}">删除</a>
                                                        </div>
                                                    </td>
                                                </tr>
                                            </volist>
                                            </tbody>
                                        </table>
                                        
                                    </div>
                                </div>
                                <div class="pagination">
                                    {$page}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>

</body>
<script src="__PUBLIC__/js/layui.all.js"></script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#indate' //指定元素
        });
    });
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#allotdate' //指定元素
        });
    });
</script>
<script>
    layui.use('element', function(){
        var $ = layui.jquery
            ,element = layui.element; //Tab的切换功能，切换事件监听等，需要依赖element模块
        //触发事件
        var active = {
            tabChange: function(){
                //切换到指定Tab项
                element.tabChange('demo', '22'); //切换到：用户管理
            }
        };


    });
</script>


<script>

        layui.use(["form","layer","laydate","element"], function(){ //独立版的layer无需执行这一句
            var  form = layui.form
            , $ = layui.jquery
            ,layer = layui.layer
            ,element = layui.element
            , laydate = layui.laydate;
            element.render();
            var shows=false;
            $('.more').on('click',function(){
                if(shows == false){
                    $('.more_show').show()
                    $(this).find('.layui-icon').removeClass('layui-icon-up')
                    $(this).find('.layui-icon').addClass('layui-icon-down')
                    shows=true;
                }else if(shows == true){
                    $('.more_show').hide()
                    $(this).find('.layui-icon').removeClass('layui-icon-down')
                    $(this).find('.layui-icon').addClass('layui-icon-up')
                    shows=false
                }

            })
            var shows2=false;
            $('#allot').on('click',function(){
                $(this).css({"background-color":"#1E9FFF","color":"#fff"});
                if(shows2 == false){
                    $('.more_show2').show()
                    $(this).find('.layui-icon').removeClass('layui-icon-up')
                    $(this).find('.layui-icon').addClass('layui-icon-down')
                    shows2=true;
                }else if(shows2 == true){
                    $('.more_show2').hide()
                    $(this).find('.layui-icon').removeClass('layui-icon-down')
                    $(this).find('.layui-icon').addClass('layui-icon-up')
                    shows2=false
                    $(this).css({"background-color":"#fff","color":"#000"})
                    
                }

            })
        });


</script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#datesign' //指定元素
        });
    });
</script>
</html>